package model;
import java.util.ArrayList;
import java.io.*;

public class MOD {
    
    ArrayList<Activity> _activities = new ArrayList<Activity>();
    ArrayList<Node> _nodes = new ArrayList<Node>();
    ArrayList<Edge> _edges = new ArrayList<Edge>();
    
    int _numOfProcedures = 5;
    int _numOfPatientTypes = 1067;
    
    Arrive _arrive;
    Leave _leave;
    Sort _sort;
            
    Activity startActivity;
    Activity endActivity;
    
    String description;
       
    public MOD() {
        makeArrive();
        makeSort();
        makeProcedure();
        makeLeave();
    }
    
    public void makeArrive() {
        _arrive = new Arrive(_numOfPatientTypes);
    }
    
    public void makeSort() {
        _sort = new Sort(_numOfProcedures);
    }
    
    public void makeProcedure() {
        for (int procedureCounter = 1; procedureCounter <= _numOfProcedures; procedureCounter++) {
            description = "Procedure " + procedureCounter;
            startActivity = new Activity(procedureCounter, description);
            _activities.add(startActivity);
            endActivity = new Activity(procedureCounter, description);
            _activities.add(endActivity);
        }
    }
    
    public void makeLeave() {
        _leave = new Leave();
    }
    
    public void getNodes() {
        /*
         *      Vertex #1
                Name:             RUN
                Description:      
                State Changes:    PMAX=DISK{INIT.DAT;1},PRDMAX=DISK{INIT.DAT;2},PDATA=DISK{INIT.DAT;3},PRDDATA=DISK{INIT.DAT;4},RNK[0]=2,RNK[1]=2,RNK[2]=2,RNK[3]=2,RNK[4]=2,RNK[5]=2,STAFF=10
                Parameter(s):     
                Bitmap(Inactive): 
                Bitmap(Active):   
                Use Flowchart Shapes:   0
                Use Opaque Bitmaps:   0
                Location:         X: -0.94;  Y:  2.83;  Z: -1.00;
                Local Trace:      PDATA,PRDDATA
                Trace Location:   Bottom
         */
        
    }
    
    public void getEdges() {
        /*
         *  Sub-Edge #24
            Description:   
            Type:          Scheduling
            Origin:        P5_SRT
            Destination:   P5_LVE
            Condition:     1==1
            Delay:         DISK{PROC.DAT;PRDDATA*5+2}
            Priority:      5
            Attributes:    ENT[0],ENT[1],ENT[2],ENT[3],ENT[4]+1
         */
    }
    
    public void output() {
        
    }
}
